﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace HCQ2_Model.VR.Params
{
    /// <summary>
    ///  用户消息
    /// </summary>
    public class UserMessageParam
    {
        public string userid { get; set; }
        public int user_id { get; set; }
        /// <summary>
        ///  发送用户id
        /// </summary>
        public int send_id { get; set; }
        public string user_name { get; set; }
        /// <summary>
        ///  商铺id
        /// </summary>
        public int folder_id { get; set; }
        /// <summary>
        ///  消息类别
        ///  1=发展合伙人，2=新增合伙人
        /// </summary>
        public int mess_type { get; set; } = 1;
        /// <summary>
        ///  消息内容
        /// </summary>
        [Required(ErrorMessage = "mess_content：消息内容不能为空")]
        public string mess_content { get; set; }
        /// <summary>
        ///  链接地址
        /// </summary>
        [Required(ErrorMessage = "link_url：链接地址不能为空")]
        public string link_url { get; set; }
        /// <summary>
        ///  推送平台
        ///  1=小程序，2=网站，3=客户端
        /// </summary>
        public int push_from { get; set; } = 1;
        /// <summary>
        ///  状态 -2全部
        /// </summary>
        public int mess_status { get; set; }
    }
    public class UserMessPram
    {
        public string userid { get; set; }
        public int user_id { get; set; }
        /// <summary>
        ///  商铺id
        /// </summary>
        public int folder_id { get; set; }
        /// <summary>
        ///  消息类别
        ///  1=发展合伙人，2=新增合伙人
        /// </summary>
        public int mess_type { get; set; } = 1;
        /// <summary>
        ///  推送平台
        ///  1=小程序，2=网站，3=客户端
        /// </summary>
        public int push_from { get; set; } = 1;
        /// <summary>
        ///  状态 -2全部
        /// </summary>
        public int mess_status { get; set; }
    }
    /// <summary>
    ///  更新用户消息模型
    /// </summary>
    public class ModifyUserMessage: VRBaseParam
    {
        public int id { get; set; }
        public int mess_status { get; set; }
    }
    /// <summary>
    ///  用户消息查询模型
    /// </summary>
    public class UserMessageQuery
    {
        /// <summary>
        ///  消息类别【1=发展合伙人，2=新增合伙人】
        /// </summary>
        public int mess_type { get; set; }
        /// <summary>
        ///  推送平台boardPlatType【1=小程序，2=网站，3=客户端】
        /// </summary>
        public int push_from { get; set; }
        /// <summary>
        ///  状态【-1：未读；0：已忽略；1：已读】-2:全部
        /// </summary>
        public int mess_status { get; set; } = -2;
        public int page { get; set; } = 1;
        public int rows { get; set; } = 10;
    }
    /// <summary>
    ///  下线用户请求参数
    /// </summary>
    public class OffLineUserParam
    {
        /// <summary>
        ///  经度
        /// </summary>
        public decimal gps_x { get; set; }
        /// <summary>
        ///  纬度
        /// </summary>
        public decimal gps_y { get; set; }
        /// <summary>
        ///  关键字模糊匹配：用户名、手机号
        /// </summary>
        public string keyword { get; set; }
        /// <summary>
        ///  模糊匹配：真实姓名
        /// </summary>
        public string du_name { get; set; }
        /// <summary>
        ///  默认：1
        ///  1=按审批通过时间降序（后审批的在前）
        ///  2=按距离顺序（距离小的在前）
        /// </summary>
        public int order_type { get; set; } = 1;
        /// <summary>
        ///  用户id
        /// </summary>
        [DisplayName("用户id")]
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "用户id必须大于0！")]//大于1正则表达式
        public int user_id { get; set; }
        /// <summary>
        ///  商铺id
        /// </summary>
        [DisplayName("商铺id")]
        [RegularExpression("^([1-9][0-9]*)$", ErrorMessage = "商铺id必须大于0！")]//大于1正则表达式
        public int folder_id { get; set; }
        /// <summary>
        ///  状态
        ///  -1=全部；0=无效；1=有效
        /// </summary>
        public int mess_status { get; set; }
    }
}